NULL=

xml_in_files = credenza.xml.in
xml_files = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@

desktopdir       = $(datadir)/applications
desktop_DATA     = $(desktop_in_files:.desktop.in=.desktop)
desktop_in_files = 					\
	credenza.desktop.in				\
	credenza-home.desktop.in			\
	credenza-computer.desktop.in			\
	credenza-folder-handler.desktop.in		\
	credenza-file-management-properties.desktop.in  \
	credenza-browser.desktop.in                     \
	credenza-autorun-software.desktop.in
@INTLTOOL_DESKTOP_RULE@

mimedir = $(datadir)/mime/packages
mime_DATA = $(xml_files)

credenzadatadir = $(datadir)/credenza

credenzadata_DATA = \
	browser.xml 			\
	credenza-extras.placeholder 	\
	credenza-suggested.placeholder 	\
	$(NULL)

EXTRA_DIST = $(credenzadata_DATA) 	\
	credenza.desktop		\
	credenza.desktop.in		\
	$(xml_in_files) 		\
	$(desktop_in_files)		\
	$(NULL)

CLEANFILES = $(xml_files)	\
	$(desktop_DATA)		\
	$(NULL)

SUBDIRS = \
	icons    \
	patterns \
	$(NULL)

install-data-hook:
if ENABLE_UPDATE_MIMEDB
	$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
endif

uninstall-hook:
if ENABLE_UPDATE_MIMEDB
	$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
endif
